package com.yingxin.yx.framework.commons.activiti.enums;

/**
 * 审批人类型
 */
public enum AssigneeType {


    USER("USER", "指定用户"),

    CANDIDATE_USERS("CANDIDATE_USERS", "指定多个用户"),

    DEPT_MGR("DEPT_MGR", "指定部门主管"),

    GROUPS("GROUPS", "指定组"),

    APPLICANT("APPLICANT", "申请人"),

    APPLICANT_MGR("APPLICANT_MGR", "申请人部门主管");


    private String type;

    private String typeName;

    AssigneeType(String type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }


    public static AssigneeType getEnum(String type) {
        for (AssigneeType i : AssigneeType.values()) {
            if (i.getType().equals(type)) {
                return i;
            }
        }
        return null;
    }
}
